package controllers

import "github.com/astaxie/beego"


type TestInputController struct {
	beego.Controller
}

type User1 struct {
	Username string
	Passwod string
}

func (c *TestInputController) Get() {
/*	id := c.GetString("id")
	c.Ctx.WriteString(id)

	name := c.Input().Get("name")
	c.Ctx.WriteString("name = "+name)*/

	c.Ctx.WriteString(`<html><form action="http://localhost:8081/testInput" method="post"> 
							<input type="text" name="Username"/>
							<input type="password" name="Password"/>
							<input type="submit" value="提交"/>
					   </form></html>
						`)
}

func (c *TestInputController) Post() {
	u := User{}
	if err := c.ParseForm(&u); err != nil{

	}

	c.Ctx.WriteString("Username:"+ u.Username+"Password:"+u.Password)
}